Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error message for calling a method on a raw pointer with an unknown pointee #111954

Merged
merged 1 commit into from
May 27, 2023

Conversation

asquared31415
Copy link
Contributor

The old error message had very confusing wording.
Also added some more test cases besides the single edition test.

r? @compiler-errors

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 25, 2023
@@ -18,7 +18,7 @@ hir_typeck_struct_expr_non_exhaustive =
cannot create non-exhaustive {$what} using struct expression

hir_typeck_method_call_on_unknown_type =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should also rename this slug.. method_call_on_unknown_raw_pointee?

@compiler-errors
Copy link
Member

r=me with nit or not, if you do fix it then please squash into one commit instead of adding it on top

@bors delegate+

@BoxyUwU
Copy link
Member

BoxyUwU commented May 25, 2023

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented May 25, 2023

📌 Commit fbf2a7d9e2958a1fe786a9b3241d6c5e5a08bf0e has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2023
@compiler-errors
Copy link
Member

@bors r- testing a thing

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 25, 2023
@asquared31415
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented May 25, 2023

📌 Commit fbf2a7d9e2958a1fe786a9b3241d6c5e5a08bf0e has been approved by asquared31415

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 25, 2023
@compiler-errors
Copy link
Member

lol you mean

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented May 25, 2023

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented May 25, 2023

📌 Commit fbf2a7d9e2958a1fe786a9b3241d6c5e5a08bf0e has been approved by compiler-errors

It is now in the queue for this repository.

@compiler-errors
Copy link
Member

oh yeah rollup too

@bors rollup

@bors
Copy link
Contributor

bors commented May 26, 2023

☔ The latest upstream changes (presumably #111858) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 26, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 26, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#111384 (Fix linking Mac Catalyst by including LC_BUILD_VERSION in object files)
 - rust-lang#111899 (CGU cleanups)
 - rust-lang#111940 (Clarify safety concern of `io::Read::read` is only relevant in unsafe code)
 - rust-lang#111947 (Add test for RPIT defined with different hidden types with different substs)
 - rust-lang#111951 (Correct comment on privately uninhabited pattern.)

Failed merges:

 - rust-lang#111954 (improve error message for calling a method on a raw pointer with an unknown pointee)

r? `@ghost`
`@rustbot` modify labels: rollup
@asquared31415
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented May 26, 2023

📌 Commit b19466a has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 26, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 26, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#111714 (Stop confusing specification levels when computing expectations.)
 - rust-lang#111927 (Migrate `item_static` to Askama)
 - rust-lang#111954 (improve error message for calling a method on a raw pointer with an unknown pointee)
 - rust-lang#111973 (Update current implementation comments for `select_nth_unstable`)
 - rust-lang#111976 (Generate docs for bootstrap itself)
 - rust-lang#111977 (Make errors from `x doc` less verbose)
 - rust-lang#111987 (do not prefer substs relate during coherence)
 - rust-lang#111991 (Change ty and const error's pretty printing to be in braces)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e7068ff into rust-lang:master May 27, 2023
11 checks passed
@rustbot rustbot added this to the 1.71.0 milestone May 27, 2023
@asquared31415 asquared31415 deleted the unknown_ptr_type_error branch May 28, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants